app.controller('baseController',function($scope) {
    //分页查询
    $scope.paginationConf = {
        currentPage: 1,
        totalItems: 10,
        itemsPerPage: 10,
        perPageOptions: [10, 15, 20, 30, 40, 50],
        onChange: function () {
            $scope.reload()
        }
    }
//重新加载页面
    $scope.reload = function () {
        $scope.search($scope.paginationConf.currentPage, $scope.paginationConf.itemsPerPage)
    }
    //选中id的集合
    $scope.selectIds=[];
    //更新复选
    $scope.updateSelection=function ($event,id) {
        //如果是被选中，则增加到数组
        if ($event.target.checked){
            $scope.selectIds.push(id);
        }else {
            var  idx=$scope.selectIds.indexOf(id);
            //删除
            $scope.selectIds.splice(idx,1);
        }
    }

})